package org.example;

import lombok.Builder;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@Data
@Builder(toBuilder = true)
public class Foo {
    @NotBlank
    @NotNull
    @Size(min = 2,
            max = 14,
            message = "name:[${validatedValue}],length: {min} to {max}"
    )
    private String name;
    @NotNull
    private Integer age;
}
